home *** CD-ROM | disk | FTP | other *** search
Wrap
/* v1.30 Save all Marko Seppänen marko.seppanen@wwnet.fi */ address IMAGEENGINEER Options results /* signal on error */ /* Setup a place for errors to go */ PROJECT_LIST list=result if list="" then exit 'REQUEST "Do you want to use your default render settings?" "Yes|No"' def=result if def=="0" then do 'RENDER_GET "How would you like pictures to be rendered?"' if RC=5 then exit renderoptions=result parse var renderoptions qq ww ee rr tt yy end if exists("ie:prefs/logosavedir.cfg") == "1" then do call open("def","ie:prefs/logosavedir.cfg","R") defdir=readln("def") call close("def") end else do defdir="ram:" end 'GET_DIR "And where is the save-directory?" "Save"' '"'defdir'"' if RC=5 then exit logosavedir=result endpart=right(logosavedir,1) if endpart~=":" & endpart~="/" then logosavedir=logosavedir||"/" call open("def","ie:prefs/logosavedir.cfg","W") call writeln("def",logosavedir) call close("def") defdir=logosavedir kpl=words(list) do i=1 to kpl pic=subword(list,i,1) temppic=strip(left(pic,20),T) tmp=0 do until test=0 test=exists(defdir""temppic"_"tmp"".ILBM) if test=1 then do tmp=tmp+1 end end RENDER_CLOSE pic if tt=="0" then 'PALETTE_LOAD' pic 'ie:Palettes/Colorful.palette' if def=="0" then RENDER_SET pic renderoptions RENDER pic IE_TO_FRONT savename='"'defdir""temppic"_"tmp"".ILBM'"' SAVE pic savename '"'ILBM CmpByteRun1'"' RENDER_CLOSE pic end exit /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do /* Did the user just cancel us? */ IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!' exit end